package main

import (
	"fmt"
	"runtime"
	"time"
)

func test() {
	for i := 0; i < 10; i++ {
		fmt.Println("hello workd", i)
		time.Sleep(time.Second)
	}
}
func main() {
	go test()
	for i := 0; i < 10; i++ {
		fmt.Println("main hello workd", i)
		time.Sleep(time.Second)
	}

	// 返回本地机器的逻辑CPU个数
	cpu := runtime.NumCPU()
	fmt.Println("cpu ", cpu)

}
